import request from '@/utils/request'

/**
 * 首页小区基本信息
 * http://192.168.20.109:3000/project/41/interface/api/1900
 * @param {*} data 
 * @returns 
 */
const baseInfo = (data = {}) =>{
  return request({
    url: '/large/screen/community',
    method: 'post',
    data: data
  })
}

/**
 * 首页物业费统计
 * http://192.168.20.109:3000/project/41/interface/api/1908
 * @param {*} data 
 * @returns 
 */
const propertyFeeRecord = (data = {}) =>{
  return request({
    url: `/large/screen/costChart`,
    method: 'post',
    data: data
  })
}

/**
 * 首页新闻信息
 * http://192.168.20.109:3000/project/41/interface/api/1908
 * @param {*} data 
 * @returns 
 */
const noticesList = (data = {}, param = {}) =>{
  return request({
    url: `/large/screen/notices?pageSize=${param.pageSize}&pageNum=${param.pageNum}`,
    method: 'post',
    data: data
  })
}

/**
 * 获取小区人员统计数目
 * http://192.168.20.109:3000/project/41/interface/api/1908
 * @param {*} data 
 * @returns 
 */
const countResidentNum = (data) => {
  return request({
    url: "/large/screen/resident/count",
    method: "post",
    data: data
  })
}

/**
 * 工单统计
 * http://192.168.20.109:3000/project/41/interface/api/1908
 * @param {*} data 
 * @returns 
 */
const countRepairNum = (data) => {
  return request({
    url: '/large/screen/repair/count',
    method: 'post',
    data: data
  })
}


export default {
  baseInfo,
  noticesList,
  propertyFeeRecord,
  countResidentNum,
  countRepairNum
}